﻿/* 
 * Rug.Cmd part of Rugland Console Framework
 * 
 * THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, 
 * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED 
 * WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
 * 
 * Copyright (C) 2008 Phill Tew. All rights reserved.
 * 
 */

using System;
using System.Collections.Generic;
using System.Text;

namespace Rug.Cmd
{
    /// <summary>
    /// Stores forground and background ConsoleColorExt colours
    /// </summary>
    public struct ConsoleColorState
    {
        public ConsoleColorExt ForegroundColor;
        public ConsoleColorExt BackgroundColor;

        public ConsoleColorState(ConsoleColorExt ForegroundColor, ConsoleColorExt BackgroundColor)
        {
            this.ForegroundColor = ForegroundColor;
            this.BackgroundColor = BackgroundColor; 
        }

        /// <summary>
        /// Gets a ConsoleColorState with the fore and back colours swapped 
        /// </summary>
        public ConsoleColorState Inverse
        {
            get { return new ConsoleColorState(BackgroundColor, ForegroundColor); } 
        }
    }
}
